package demo;

public class Demo06 {
    public static void main(String[] args) {
       int n = 5;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(n<<1); //10
        System.out.println(n<<2); //20
        System.out.println(n<<3); //40
        System.out.println(n<<4); //80

        n = 100;
        System.out.println(n>>1); //50
        System.out.println(n>>2); //25
        System.out.println(n>>3); //12
        System.out.println(n>>4); //6


        int m = -100;
        System.out.println(m>>1);
        System.out.println(m>>2);
        System.out.println(m>>3);
        System.out.println(m>>4);

        /*
        int n = 0xbb;
        int m = 0xbd00;
        int k = n | m;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(Integer.toBinaryString(m));
        System.out.println(Integer.toBinaryString(k));

         */

        /*
        int n1 = 0x7bfa887f;
        int m1 = n1<<1;
        int k1 = n1<<2;
        int g1 = n1<<8;
        System.out.println(Integer.toBinaryString(n1));
        System.out.println(Integer.toBinaryString(m1));
        System.out.println(Integer.toBinaryString(k1));
        System.out.println(Integer.toBinaryString(g1));

         */

        /*
        int b1 = 0x71;
        int b2 = 0xfa;
        int b3 = 0x91;
        int b4 = 0x57;
         b1 = b1<<24;
         b2 = b2<<16;
         b3 = b3<<8;
         int n = (b1 | b2 | b3 | b4);
        System.out.println(Integer.toBinaryString(b1));
        System.out.println(Integer.toBinaryString(b2));
        System.out.println(Integer.toBinaryString(b3));
        System.out.println(Integer.toBinaryString(b4));
        System.out.println(Integer.toBinaryString(n));

         */
















    }

}
